package com.blackitheima1.LambdaDemo.test1;
//Lambda表达式
public class TestSwimming {
    public static void main(String[] args) {
        System.out.println("Lambda表达式原始形态:");
        goSwimming(()->{
            System.out.println("黑子,我们刨坑找小白可好!");
        });
        System.out.println("Lambda表达式超级变身:");
        goSwimming(()-> System.out.println("黑子,走,游泳去喽!"));
    }
    public static void goSwimming(Swimming swimming){
        swimming.swim();
    }
}

//接口
interface Swimming{
    public abstract void swim();
}
